import json

from config import BAST_PATH


def read_json_file(filename):
    with open(filename,"r",encoding="utf8") as f:
        res=json.load(f)
    #在循环之前创建空列表
    list_data=[]
    for i in res:
        #提取value，转换成元组
        tup=tuple(i.values())
        #追加空列表
        list_data.append(tup)
    return list_data

if __name__ == '__main__':
    # filename="D:\heima\pythoncode02\data\login_data.json"
    filename=BAST_PATH+"\data\login_data.json"
    ret=read_json_file(filename)
    print(ret)